package com.psjj;

public class Demo02 {
    private int i;
    private static int j;
    private final int k=3;
    public void method(){
        System.out.println("普通方法");
    }
    public static void method2(){
        System.out.println("静态方法");
    }
    public Demo02(){
        System.out.println("构造方法");
    }
    {
        System.out.println("普通代码块");
    }
    private final class Inner{
        private int i;
        private int j;
        public void method(){
            System.out.println("普通方法不能写静态的");
        }
    }
    private static  class Inner2{
        private static int i;
        private int j;
        public static void method(){
            System.out.println("普通方法/静态方法都可以");
        }
    }

    public static void main(String[] args) {
        Demo02 demo02=new Demo02();
        System.out.println(demo02.i);
        System.out.println(Demo02.j);
        System.out.println(demo02.k);
        demo02.method();
        Demo02.method2();
        Inner inner=demo02.new Inner();
        System.out.println(inner.i);
        System.out.println(inner.j);
        inner.method();
        Demo02.Inner2 inner2=new Demo02.Inner2();
        System.out.println(inner2.i);
        System.out.println(inner2.j);
        inner2.method();
        System.out.println("hufhsdjkbdskjvb");
        System.out.println("我已熟练掌握git提交");
    }

}
